import Vue from 'vue'
import Router from 'vue-router'
import Login from "../view/Login";
import Register from "../view/Register";
import Homepage from "../view/Homepage";
import PersonalInfo from "../view/PersonalInfo";
import Appointment from "../view/Appointment";
import MyOrder from "../view/MyOrder";
import Home from "../view/Home";
import Shopping from "../view/Shopping";
import Food from "../view/Food";
import Medical from "../view/Medical";
import Base from "../view/Base";
import Manage from "@/view/manager/Manage";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login,
    },
    {
      path:'/Register',
      name:'Register',
      component:Register
    },
    {
      path:'/Home',
      name:'Home',
      component:Home,
      children:[
        {
          path:'/HomePage',
          name:'HomePage',
          component:Homepage,
        },
        {
          path:'/PersonalInfo',
          name:'PersonalInfo',
          component:PersonalInfo
        },
        {
          path:'/Appointment',
          name:'Appointment',
          component:Appointment
        },
        {
          path:'/MyOrder',
          name:'MyOrder',
          component:MyOrder
        },
        {
          path:'/Shopping',
          name:'Shopping',
          component:Shopping
        },
        {
          path:'/Food',
          name:'Food',
          component:Food
        },
        {
          path:'/Medical',
          name:'Medical',
          component:Medical
        },
        {
          path:'/Base',
          name:'Base',
          component:Base
        },
        {
          path:'/Manage',
          name:'Mange',
          component: Manage
        }
      ]
    },
  ]
})
